home *** CD-ROM | disk | FTP | other *** search
/ FM Towns: Free Software Collection 8 / FM Towns Free Software Collection 8.iso / t_os / bb / src / mesout.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-06-01  |  976 b   |  48 lines

  1. /*
  2.  
  3.         message display for 16 color graphic screen
  4.  
  5.                       1993.6.27 v1.0
  6.                       copyright Y.Ouchi
  7.  
  8.             in        id : display message id
  9.  
  10. */
  11.  
  12. #include <stdio.h>
  13. #include <string.h>
  14. #include <stdlib.h>
  15. #include "egb.h"
  16. #include "bb.h"
  17.  
  18. extern    void    linedsp(int, int, char *);
  19. extern    char    egbwork[1536];
  20.  
  21. void mesout(int id)
  22. {
  23.     char    *errormes[10]={    "log file nothing !",
  24.                             "memory get failed !",
  25.                             "text too much !",
  26.                             "title too much !",
  27.                             "log text nothing !",
  28.                             "","","","",""};
  29.     char    *paraerr={"message out parameter error"};
  30.     char    *keyinmes={"hit any key"};
  31.     int        i;
  32.  
  33.     EGB_writePage(egbwork,0);
  34.     EGB_color(egbwork, 0, ALARM_MES_COL);
  35.     if ( id<0 || id>9 || strlen(errormes[id])==0 ) {
  36.         linedsp(50,100,paraerr);
  37.     }
  38.     else{
  39.         linedsp(50,100,errormes[id]);
  40.     }
  41.     linedsp(120,130,keyinmes);
  42.     i = INKEY() ;
  43.     while( i == INKEY() ) ;  
  44.     EGB_color(egbwork, 0, TEXT_COL);
  45.     return;
  46. }
  47.  
  48.